package mem

import (
	"fmt"
	"os"
)

type VirtualMemoryState struct {
	Total     uint64 `json:"total"`
	Available uint64 `json:"available"`
	Used      uint64 `json:"used"`
}

var TOTAL_MEM_SIZE uint64

func init() {
	r, err := GetVirtualMemStat()
	if err != nil {
		fmt.Println("Get Global Memory Info failed, err=", err.Error())
		os.Exit(1)
	}
	TOTAL_MEM_SIZE = r.Total
}